package com.bfly.mall.product.service.impl;

import com.bfly.core.base.service.BaseServiceImpl;
import com.bfly.mall.product.dao.FreightTemplatePricingMapper;
import com.bfly.mall.product.entity.FreightTemplatePricing;
import com.bfly.mall.product.service.IFreightTemplatePricingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author 长沙商脉科技有限公司
 * @date 2020/9/23 16:20
 */
@Service
@Transactional(propagation = Propagation.SUPPORTS, rollbackFor = Exception.class)
public class FreightTemplatePricingServiceImpl extends BaseServiceImpl<FreightTemplatePricing, Integer> implements IFreightTemplatePricingService {

    @Autowired
    private FreightTemplatePricingMapper pricingMapper;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void clearPricing(int templateId) {
        pricingMapper.clearPricing(templateId);
    }
}
